<template>
  <div class="top-title">
    {{ title }}
  </div>
</template>

<script setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute();

const title = computed(() => route.meta.title || '未知页面');
</script>

<style scoped>
.top-title {
  background-color: #f8f8f8;
  padding: 10px;
  text-align: center;
  font-size: 23px;
  color: #682757;
}
</style>